<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>M3Gen :: Index</title>
    </head>
    <body>
        <h1>M3Gen :: Index</h1>¨
		<p>
M3Gen is a plugin for jsTree (v.0.1 was created for jsTree 0.9.8).
The plugin enables transformation of any instance model (an array in JSON format) to the 
canonical jsTree model used by jsTree to draw the tree.
M3Gen operates by having an instance model and some transformation rules (ruleSetConfiguration) passed to it. 
M3Gen calls parses the instance model by traversing it and applying rules defined in ruleSets in the ruleSetConfiguration. 
During this process a hierarchical nodeObj model is created. The tree model consists of branches on branches and finally leaves.
Each branch can have a special branch node created as the container node for children within the branch.
The nodeObj model is a general purpose model, not specific to jsTree.
In the final step, a transformer is called to transform the nodeObj model to a specific model, by default to the jsTree model.
In the future, other result models could easily be supported by creating adapters to these models using the same pattern transforming the same
underlying nodeObj model.			
M3Gen has been designed to be highly flexible and customizable. The community is free to provide additional add-ons etc.
The design uses javascript inheritance, including a few of J.Crockford's utility methods for inheritance.
M3Gen has been designed around parsers and builders. Each m3gen component is a prototype with a constructor and inherit from the Base prototype containing a host of utility functions.
The main functions defined for the component can be overridden by creating a new component that inherits from the original and defines its own prototype functions.
These new functions can call the underlying functions using the this.uber(arg) method (see util/inheritanceUtil.js).
The inheritance currently implemented is based on <a href="http://javascript.crockford.com/inheritance.html">J. Crockfords inheritance functions</a>.
In the future, it is planned to move to a more advance framework such as <a href="http://code.google.com/p/base2/">Base2</a>.			
		</p>
		<p>
			For more info, see <a href="docs/index.html">M3Gen :: Documentation</a>
		</p>
    </body>
</html>
